package com.gitpull.controller;


import com.gitpull.pojo.studentVO;
import com.gitpull.service.studentService;
import com.gitpull.utils.Result;
import com.gitpull.utils.ResultUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/student")
public class studentController {
    @Autowired
    private studentService studentService;

    @GetMapping
    public Result<List<List<studentVO>>> getStudents() {
        List<List<studentVO>> students = studentService.getInfo();
        return ResultUtil.success(students);
    }
}
